<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>user</title>
</head>

<body>
    <% include user-header.html %>
        user
        <ol>
            <li>
                id: <%= id%>
            </li>
            <li>
                <%# 注释%>
                    name: <%= name%>
            </li>
            <li>
                <% for(let i=0;i<list.length;i++){ %>
                    <span>
                        <%=list[i] %>
                    </span>
                    <% } %>
            </li>
        </ol>
        <div>
            <% if(user.name){%>
                已经登陆： <%= user.name%>
                    <%} else {%>
                        未登录
                        <%}%>
        </div>
        <button onclick="login()">登录</button>
        <button onclick="logout()">退出</button>

</body>
<script src="public/js/user.js"></script>

</html>